<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/6/21
 * Time: 16:41
 */

namespace Admin\Controller;


class SeturlController extends AdminController
{
    //给boss系统和策略系统设置接口地址
    public function seturl(){
        $address="./curlurl.txt";
        if(IS_POST){
            $url=I('url','','trim');
            if(!empty($url)){
                file_put_contents($address,$url);
                $this->redirect('seturl');
            }
        }else{
            if(file_exists($address)){
                $url=file_get_contents($address);
                $this->assign('url',$url);
            }
        }

        $this->display();
    }
}